# # 把十进制数转换为4个十六进制数，倒序排列
# def decimal_to_four_hex_numbers(decimal_number):
#     maxdecimal_number = 0xFFFFFFFF
#     if decimal_number > maxdecimal_number:
#         raise ValueError("Decimal number is too large")
#     if decimal_number < 0:
#         decimal_number += maxdecimal_number
        
#     # 将十进制数转换为4字节的十六进制字符串
#     hex_string = f"{decimal_number:08x}"
    
#     # 将十六进制字符串拆分为4个两位的十六进制数
#     hex_numbers = [int(hex_string[i:i+2], 16) for i in range(0, 8, 2)]
#     hex_numbers.reverse()

#     return hex_numbers


# # 把四个十进制数转换成四个十六进制数，再倒序排列成一个十六进制，再转成十进制数
# # 相当于256进制
# def four_decimal_numbers_to_decimal(num1, num2, num3, num4):
#     decimal_number = num4 * 256**3 + num3 * 256**2 + num2 * 256 + num1
#     if decimal_number > 256**4/2:
#         decimal_number = decimal_number - 256**4
#     return decimal_number


# def sign_func(x, bound = 10):
#     if x > abs(bound):
#         return 1
#     elif x < -abs(bound):
#         return -1
#     else:
#         return x/abs(bound)



